package com.yuzhi.master.drainagePermit.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yuzhi.common.annotation.DictFormat;
import com.yuzhi.common.annotation.LocalDateTimeFormat;
import com.yuzhi.master.sewage.rmstSz.entity.request.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 排水许可证视图对象 drain_drainage_permit
 *
 * @author coding123
 * @date 2025-07-15
 */
@Data
@ExcelIgnoreUnannotated
@TableName("drain_drainage_permit_v")
public class DrainDrainagePermitView  {

    private static final long serialVersionUID = 1L;

    /**
     * 排水许可证主键
     */
    private String id;

    /**
     * 排水户ID
     */
    private String clientId;

    /**
     * 许可证编号
     */
    private String permitNo;

    /**
     * 申请编号
     */
    private String applyNo;

    /**
     * 申请时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime applyDate;

    /**
     * 受理编号
     */
    private String acceptNo;

    /**
     * 受理时间
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime acceptDate;

    /**
     * 申请类别(1:首次申请 2:延期申请)
     */
    @DictFormat(defaultValue = "permit_apply_type")
    private String applyType;

    /**
     * 填表日期
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime  submitDate;

    /**
     * 许可大类(1-临时，2-正式)
     */
    @DictFormat(defaultValue = "permit_category")
    private String permitCategory;


    /**
     * 许可证有效期开始时间
     */
    private LocalDate startDate;

    /**
     * 许可证有效期截止时间
     */
    private LocalDate  endDate;

    /**
     * 发证单位：城镇排水主管部门名称（如住建局、水务局等）
     */
    private String passportUnit;

    /**
     * 盖章日期
     */
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private  LocalDateTime  stampDate;


    /**
     * 排水户名称
     */
    private String draincName;

    /**
     * 排水户类型1-重点排水户，2-一般排水户
     */
    @DictFormat(defaultValue = "drainc_type")
    private String draincType;

    /**
     * 排水户行政区域
     */
    private String areaCode;

    /**
     * 排水户地址
     */
    private String draincAdd;

    /**
     * 有效期类型：有效、临近(距离到期1个月)、过期
     */
    @TableField(exist = false)
    private String validityType;

}
